package com.atguigu.cm.util

/**
 * description ：字符串工具类
 * author      ：剧情再美终是戏 
 * mail        : 13286520398@163.com
 * date        ：Created in 2020/1/10 9:52
 * modified By ：
 * version:    : 1.0
 */
object StrUtil {


  /**
   * 判断字符串是否为空
   *
   * @Author 剧情再美终是戏
   * @Date 2020/1/10 9:56
   * @param str
   * @return boolean
   * @Version 1.0
   **/
  def isEmpty(str: String): Boolean = {
    !isNotEmpty(str)
  }

  /**
   * 判断字符串是否不为空
   *
   * @Author 剧情再美终是戏
   * @Date 2020/1/10 9:56
   * @param str
   * @return boolean
   * @Version 1.0
   **/
  def isNotEmpty(str: String): Boolean = str match {
    case null => false
    case "null" => false
    case "" => false
    case _ => true
  }
}
